package com.lucenly.spell.fragment

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.lucenly.spell.R
import com.lucenly.spell.activity.BecomeActivity
import com.lucenly.spell.adapter.OrderAdapter
import com.lucenly.spell.adapter.SpellAdapter
import com.lucenly.spell.adapter.TypeItemAdapter
import com.lucenly.spell.base.BaseFragment
import com.lucenly.spell.databinding.FragmentOrderBinding
import com.lucenly.spell.databinding.FragmentSpellBinding
import com.moregold.mvvmlib.ext.ext_doubleClick
import com.moregold.mvvmlib.ext.startActivity

class OrderFragment(var type : Int) : BaseFragment<FragmentOrderBinding>(R.layout.fragment_order) {
    override fun getViewBinding(
        inflater: LayoutInflater,
        container: ViewGroup?
    ): FragmentOrderBinding {
        return FragmentOrderBinding.inflate(inflater)
    }

    override fun initData() {
        var list = arrayListOf<String>()
        for (i in 1..6){
            list.add(""+i)
        }
//        binding.content.setBackgroundColor(color)
        binding.recyclerView.layoutManager = LinearLayoutManager(context)
        val itemAdapter = OrderAdapter(list, context!!)
        binding.recyclerView.adapter = itemAdapter
    }

    override fun initEvent() {
    }

    override fun startObserve() {
    }
}